package cn.thoughtworks.school.programCenter.repositories;

import cn.thoughtworks.school.programCenter.entities.UserAssignmentDuration;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface UserAssignmentDurationRepository extends JpaRepository<UserAssignmentDuration, Long> {
    Optional<UserAssignmentDuration> findByAssignmentIdAndUserId(Long assignmentId, Long studentId);

    Optional<UserAssignmentDuration> findByTaskIdAndAssignmentIdAndUserId(Long taskId, Long assignmentId, Long id);

}
